﻿<bc:SLBC x:Class="SLS.Presentation.RelationKeyService"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:db="clr-namespace:SLS.DataBase;assembly=CLSDB"
                    xmlns:bc="clr-namespace:SLS.Base;assembly=CLSBase"
                    mc:Ignorable="d"
                    Width="380"
                    d:DesignHeight="23"
                    d:DesignWidth="250">
    <bc:SLBC.Resources>
        <db:SLDBSET x:Key="setUI" />
        <CollectionViewSource x:Key="BaseTableViewSource"
                              Source="{Binding Path=GoodsMasterKeyRelation, Source={StaticResource setUI}}" />
    </bc:SLBC.Resources>
    <Grid 
          DataContext="{Binding Path=GoodsMasterKeyRelation}"
          Height="23"
          Width="Auto"
          HorizontalAlignment="Left"
          Margin="0,0,0,0"
          Name="MainDataGrid"
          VerticalAlignment="Top">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Label Grid.Column="0">物料编码:</Label>
        <ComboBox
                  DisplayMemberPath="MGDKEY"
                  SelectedValuePath="MGDKEY" 
                  Grid.Column="1"
                  HorizontalAlignment="Stretch"
                  Margin="0"
                  IsEditable="True"
                  StaysOpenOnEdit="True"
                  IsTextSearchEnabled="True"
                  Name="mGDKEYComboBox"
                  Text="{Binding Path=MGDKEY, Mode=OneWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                  VerticalAlignment="Center"
                  >
            <ComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel />
                </ItemsPanelTemplate>
            </ComboBox.ItemsPanel>
        </ComboBox>
        <ComboBox 
                  DisplayMemberPath="SGDKEY"
                  SelectedValuePath="SGDKEY"
                  Grid.Row="1"
                  Grid.Column="2" 
                  Margin="10,0,0,0"
                  IsEditable="True"
                  StaysOpenOnEdit="True"
                  IsTextSearchEnabled="True"
                  Name="sGDKEYComboBox"
                  Text="{Binding Path=SGDKEY, Mode=OneWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}"
                  VerticalAlignment="Center"
            HorizontalAlignment="Stretch"
                  >
            <ComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel />
                </ItemsPanelTemplate>
            </ComboBox.ItemsPanel>
        </ComboBox>
    </Grid>
</bc:SLBC>
